﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace ALinq.Mapping
{
    public class NameProvider
    {
        public virtual string GetDatabaseName(string dataContextClassName)
        {
            Error.ValidateArgumentNotNull(() => dataContextClassName);

            return dataContextClassName;
        }

        public virtual string GetTableName(string className)
        {
            Error.ValidateArgumentNotNull(() => className);

            return className;
        }

        public virtual string GetAssociation(string thisClassName, string otherClassName)
        {
            Error.ValidateArgumentNotNull(() => thisClassName);
            Error.ValidateArgumentNotNull(() => otherClassName);

            return string.Format("{0}_{1}", thisClassName, otherClassName);
        }

        public virtual string GetColumnName(string memberName)
        {
            Error.ValidateArgumentNotNull(() => memberName);

            return memberName;
        }

        public virtual string GetColumnStorageName(string memberName)
        {
            Error.ValidateArgumentNotNull(() => memberName);

            return string.Format("_{0}", memberName);
        }
    }
}
